home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 271_02 / smlibtc.doc < prev    next >
Text File  |  1987-08-18  |  45KB  |  1,255 lines

  1.          
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                             ==========================
  15.                             =    STEVE'S LIBRARY     =
  16.                             =      for Turbo C       =
  17.                             =        - by -          =
  18.                             =   Steven E. Margison   =
  19.                             =      Version 1.30      =
  20.                             ==========================
  21.  
  22.  
  23.                     Functions and Documentation Copyright 1987
  24.                    by Steven E. Margison -- All Rights Reserved
  25.  
  26.  
  27.                                 ISBN 0-944267-05-X
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.          
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.          
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.                       --------- TABLE OF CONTENTS ---------
  75.  
  76.  
  77.               Introduction ................................. 1
  78.               The Documentation ............................ 1
  79.               Installation ................................. 2
  80.               Linking ...................................... 3
  81.               Real Time Interrupt Handler .................. 4
  82.               Video Functions .............................. 5
  83.                  A.  Introduction .......................... 5
  84.                  B.  Initialization ........................ 5
  85.                  C.  De-Initialization ..................... 6
  86.                  D.  Cursor and Character Placement ........ 6
  87.                  E.  Writing Characters and Attributes ..... 7
  88.                  F.  Miscellaneous Operations .............. 7
  89.                  G.  Video Page Switching .................. 8
  90.                  H.  Reading from Video Memory ............. 9
  91.               Utilities ..... .............................. 10
  92.               Shareware .................................... 15
  93.               Warranty ..................................... 16
  94.               Registration Form ............................ --
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.          
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.          
  134.  
  135.  
  136.  
  137.  
  138.                       Steve's C Function Library for Turbo C
  139.  
  140.  
  141.          I. INTRODUCTION
  142.                  The heart  of  the  C  language  is  its  library.  Each
  143.          compiler has its own library of  functions,  which  is  complete
  144.          only  to  the degree that the compiler author wishes to make it.
  145.          The Turbo C Compiler is an excellent product, and comes  with  a
  146.          very   extensive  function  library  which  has  all  the  usual
  147.          "standard" functions, plus many DOS functions as well.  However,
  148.          the more functions a programmer has at his disposal, the shorter
  149.          the time from idea to complete program.  That's  where  "Steve's
  150.          Library" comes  in.    At  over 100 functions my library greatly
  151.          enhances program development with Turbo C.
  152.                  "Steve's Turbo-C Library" is the third  library  I  have
  153.          produced,  the other two being for the Datalight C compiler, and
  154.          the Lattice C compiler.  Many of the functions in  this  library
  155.          may also  be  found  in  the  other  two  libraries  as well.  A
  156.          significant exception is the direct video functions.   Datalight
  157.          C has an excellent (though incomplete) set of functions aimed at
  158.          providing direct access to screen memory.  Turbo-C does not have
  159.          these  functions, however, and I think the omission is a serious
  160.          flaw in any MS-DOS compiler.  I have corrected that situation in
  161.          my Turbo-C library by adding an entire package of  direct  video
  162.          access  functions, supporting standard IBM-type video boards and
  163.          modes.
  164.  
  165.  
  166.  
  167.  
  168.          II. THE DOCUMENTATION
  169.                  The documentation for the  library  is  contained  in  a
  170.          number of .DOC  files,  which  describe  each  function.    When
  171.          printed, these pages may be  placed  in  a  standard  three-ring
  172.          binder.  A utility program, PMAN.COM is provided to generate the
  173.          entire set  of documents.  PMAN requires the file LISTALL, which
  174.          may be edited to eliminate printing of certain files if desired.
  175.          (PMAN is copyrighted, but placed in the public domain.)
  176.                  To print the DOC files, you must be in a  directory  (or
  177.          on  a  floppy)  containing PMAN, LISTALL, and all the DOC files.
  178.          Just type "PMAN" at your system prompt and  the  files  will  be
  179.          printed to PRN:.
  180.                  This  documentation  is  not  intended  to be a complete
  181.          course on writing in "C", or on using the Turbo-C compiler.   It
  182.          is  assumed  that  if  you  have  this library, you already have
  183.          Turbo-C and have read Borland's fine manual.
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.                    Steve's Library for Turbo C          Page 1           
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.          
  200.  
  201.  
  202.          III. INSTALLATION
  203.                  "Steve's Turbo-C Library" is distributed as five library
  204.          files for each type of memory model. (Only the full registration
  205.          with source has all five libraries.) The filenames are:
  206.               SMTCS.LIB       Small Memory Model
  207.               SMTCC.LIB       Compact Memory Model
  208.               SMTCM.LIB       Medium Memory Model
  209.               SMTCH.LIB       Huge Memory Model
  210.               SMTCL.LIB       Large Memory Model
  211.          For  the remainder of this manual the libraries will be referred
  212.          to as SMTCx.LIB.
  213.          A typical hard disk installation  of  Turbo-C  will  consist  of
  214.          several directories, one of which will contain all the "include"
  215.          files  (those  with  ".H"  extensions)  and one with the library
  216.          files (those with ".LIB" extensions).   All  files  in  "Steve's
  217.          Library" with a ".H" extension should be placed in the directory
  218.          with the  Turbo-C  ".H" files.  Similarly, all "Steve's Library"
  219.          files with a ".LIB" extension should be placed with the  Turbo-C
  220.          ".LIB" files.   The documentation and source files from "Steve's
  221.          Library" do not need to be on the hard disk, as they  will  only
  222.          be  used  to  print  the  documentation  or  modify the function
  223.          source.  They are not used in the direct creation of  a  program
  224.          under  Turbo-C.  The executable utilities (*.EXE) files supplied
  225.          with "Steve's Library" may be optionally placed in any directory
  226.          specified in your PATH environment.    These  programs  are  all
  227.          examples  of  function  usage  and  C  programming,  and  do not
  228.          directly relate to program  development  for  Turbo-C.  However,
  229.          they are useful and should be placed on your system for access.
  230.                  The  files  with  "Steve's Library" with an extension of
  231.          ".SEM"  or  ".MAC"  are  required  only  for  re-assembling  the
  232.          assembly language  modules  from this library.  They do not need
  233.          to be placed on your hard disk unless you  plan  to  re-assemble
  234.          any ".ASM" source code files.
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.                     Steve's Library for Turbo C          Page 2          
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.          
  266.  
  267.  
  268.          IV. LINKING
  269.                  The SMTCx.LIB library must  be  linked  with  any  other
  270.          libraries whenever  a  function  is  used in your program.  Some
  271.          programs may not use  SMTCx.LIB  functions,  and  therefore  the
  272.          linking of  the  library  may  be  eliminated  to save time.  In
  273.          addition, if you have other third party libraries,  be  sure  to
  274.          include them after SMTCx.LIB.
  275.                  There  are several methods to invoke the SMTCx.LIBs when
  276.          linking under Turbo C. Refer to the Turbo C  manual,  chapter  3
  277.          (User's  Guide)  for  information  on  using  the libraries from
  278.          within the TC programming environment.   If  you  use  Borland's
  279.          "MAKE" utility with "TLINK", then include a link line similar to
  280.          this:
  281.          libs = \btc\lib\smtcs+\btc\lib\cs
  282.          
  283.          program: program
  284.